package com.ssy.lingxi.purchase.repository;

import com.ssy.lingxi.purchase.entity.PurchaseProduct;
import com.ssy.lingxi.purchase.entity.PurchaseRequisition;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wyx
 * @version 2.0.0
 * @date 2021-10-28
 */
@Repository
public interface PurchaseProductRepository extends JpaRepository<PurchaseProduct, Long> {
    void deleteByPurchaseRequisition(PurchaseRequisition purchaseRequisition);

    List<PurchaseProduct> findByPurchaseRequisition(PurchaseRequisition purchaseRequisition, Sort sort);
}
